<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="eclipse text editor">
   <title>RCP - Text Editor Example</title>
</head>
<body>

<h2>Example - RCP Text Editor</h2>

<h3>Introduction</h3>
The RCP Text Editor Example shows how to create a text editor for an RCP application.

<h3>Features demonstrated by the example RCP text editor</h3>
<ul>
<li>creating a simple text editor application along the lines of the <a href="http://www.eclipse.org/articles/Article-RCP-1/tutorial1.html">eclipse.org RCP tutorial</a>,</li>
<li>implementation of a basic text editor based on <a href="http://help.eclipse.org/help31/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/texteditor/AbstractTextEditor.html"><code>AbstractTextEditor</code></a>,</li>
<li>implementation of a document provider based on <a href="http://help.eclipse.org/help31/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/texteditor/AbstractDocumentProvider.html"><code>AbstractDocumentProvider</code></a> that operates on <a href="http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/IPath.html"><code>IPath</code></a> as editor input,</li>
<li>adding the most common actions to the application menu and toolbar,</li>
<li>adding a simple xml editor based on the eclipse example project, offering syntax highlighting.</li>
</ul>

<h3>Classes</h3>

<h4>package <code>org.eclipse.ui.examples.rcp.texteditor</code></h4>
<ul>
<li><code>TextEditorApplication</code> - an application to be run, see the <a href="http://www.eclipse.org/articles/Article-RCP-1/tutorial1.html">eclipse.org RCP tutorial</a> for more details.</li>
<li><code>TextEditorPerspective</code> - a default perspective to be opened, see the <a href="http://www.eclipse.org/articles/Article-RCP-1/tutorial1.html">eclipse.org RCP tutorial</a> for more details.</li>
<li><code>TextEditorWorkbenchAdvisor</code> - configures the basic workbench behavior: top level window style, title and icon.</li>
</ul>

<h4>package <code>org.eclipse.ui.examples.rcp.texteditor.actions</code></h4>
<ul>
<li><code>TextEditorActionBarAdvisor</code> - creates the actions typically seen in a text editor and sets up the menu and toolbar.</li>
<li><code>OpenFileAction</code> - action to open a file, which is not present as such in the eclipse IDE. The code is copied and modified from <code>OpenExternalFileAction</code>.</li>
</ul>

<h4>package <code>org.eclipse.ui.examples.rcp.texteditor.editors</code></h4>
<ul>
<li><code>SimpleEditor</code> - a simple text editor. All it does is setting the document provider and removing the smart insert mode.</li>
<li><code>SimpleDocumentProvider</code> - a simple document provider that takes <a href="http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/IPath.html"><code>IPath</code></a> as editor input elements. It can open and save to files pointed to by <a href="http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/IPath.html"><code>IPath</code></a>s. It also simplifies the read-only / state validation for basic usage without version control.</li>
<li><code>PathEditorInput</code> - an editor input implementing <a href="http://help.eclipse.org/help31/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IPathEditorInput.html"><code>IPathEditorInput</code></a>.</li>
</ul>

<h4>package <code>org.eclipse.ui.examples.rcp.texteditor.editors.xml</code></h4>
This package is copied as is from the example editor available from eclipse. The only thing that was changed are to let <code>XMLEditor</code> and <code>XMLDocumentProvider</code> inherit from <code>SimpleEditor</code> and <code>SimpleDocumentProvider</code>, respectively.

<h4><code>plugin.xml</code></h4>
The <code>plugin.xml</code> manifest adds the application, the perspective, the two editors and the open action.

</body>
</html>
